/*
 * <one line to give the program's name and a brief idea of what it does.>
 * Copyright (C) 2019
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef SHIPPLAYER_H
#define SHIPPLAYER_H

#include "ship.hpp"

class ShipPart;

/**
 * \class ShipPlayer
 * Class for describe player ships
 */
class ShipPlayer : public Ship {
public:
	ShipPlayer(const uint16_t weapon, const uint16_t reactor, const uint16_t hull, const uint16_t wings);
	ShipPlayer(const ShipPlayer & other) = delete;
	virtual ~ShipPlayer();

	void reset() override;
	double getDamage() const override;
	double getHP() const override;
	double getShield() const override;
	double getShieldAbsorption() const override;
	uint32_t getSpeed() const override;

	/**
	 * \param[in] type part type
	 * \return value for choosen part type
	 */
	double getShipPartValue(const upgradeType type) const;

	/**
	 * Set part level
	 * \param[in] type part type
	 * \param[in] level new part level
	 */
	void setShipPartLevel(const upgradeType type, const uint16_t level);

private:
	ShipPart * m_Weapon = nullptr;
	ShipPart * m_Hull = nullptr;
	ShipPart * m_Reactor = nullptr;
	ShipPart * m_Wings = nullptr;
};

#endif // SHIPPLAYER_H
